# -*- coding: utf-8 -*-
# @Time : 2021/9/12 17:04
# @Author : hello
# @Email : xxx@gmail.com
# @File : cluetocusbx_page.py
# @Project : crm
from selenium.webdriver.common.by import By
from time import sleep
from page.crmtest.addcluebases_page import AddClueBases

"""线索模块-验证线索转换成客户功能-必填项输入框（客户名称）合法输入，其他输入框为空"""

class ClueToCusbx(AddClueBases):

    namet = (By.NAME, 'con_name')
    zct = (By.CSS_SELECTOR, 'input[value="先生"]')
    yxt = (By.NAME, 'con_email')
    zwt = (By.NAME, 'con_post')
    phonet = (By.NAME, 'con_telephone')

    def qkyy(self):
        """清空已有数据"""
        self.driver.find_element(*self.fzr).clear()
        self.input_xadress('--请选择省份--')
        self.input_sadress('--请选择城市--')
        self.input_qadress('--请选择地区--')
        self.driver.find_element(* self.jd).clear()
        sleep(3)
        self.driver.find_element(*self.namet).clear()
        self.driver.find_element(*self.zct).clear()
        self.driver.find_element(*self.yxt).clear()
        self.driver.find_element(*self.zwt).clear()
        self.driver.find_element(*self.phonet).clear()
        self.driver.find_element(*self.bz).clear()

